<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>计时插件</title>
    <link href="css/style.css" rel="stylesheet" type="text/css"/>
    <script type="text/javascript" src="js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.RunTime-1.0.js"></script>
</head>

<body class="gradient">

<div id="RunTime"></div>

<script>
    $(function () {
        $('#RunTime').RunTime({
            targetDate: {
                date: "2018-06-01 00:00:00",
                unit: ['年', '月', '天', '时', '分', '秒']
            }
        });

        /*$.fn.extend({
            check: function() {
                return this.each(function() { this.checked = true; });
            },
            uncheck: function() {
                return this.each(function() { this.checked = false; });
            }
        });

        $("input[type=checkbox]").check();
        $("input[type=radio]").uncheck();*/

        /*$.extend({
            min: function (a, b) {
                return a < b ? a : b;
            },
            max: function (a, b) {
                return a > b ? a : b;
            }
        });

        $.fn.extend({
            alertWhileClick:function() {
                $(this).click(function(){
                    alert($(this).val());
                });
            }
        });

        $('input[name="test"]').alertWhileClick();

        console.log($.min(2,3)); //  2
        console.log($.max(4,5)); //  5*/
        //参考：
        // https://blog.csdn.net/yummy_go/article/details/54340820
        // https://blog.csdn.net/u011202334/article/details/51250142
        // https://blog.csdn.net/xuemoyao/article/details/19021659(较详细)

    })
</script>

</body>
</html>